package com.opal.modules.costReportForm.service.impl;

import com.opal.consts.WSC;
import com.opal.domain.R;
import com.opal.modules.costReportForm.entity.CostReportBSinglehours;
import com.opal.modules.costReportForm.mapper.mysql.CostReportBSinglehoursMapper;
import com.opal.modules.costReportForm.service.CostReportBService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class CostReportBServiceImpl implements CostReportBService {

    @Autowired
    private CostReportBSinglehoursMapper costReportBSinglehours;
    @Override
    public Object getCostReportBSinglehoursByIdService(String costReportId) {
       List<Map<String,String>> list= costReportBSinglehours.getCostReportBSinglehoursById(costReportId);
       if (list.size()>0){
           return new R(WSC.RESTPONSE_OK,"null",list);
       }
        return new R(WSC.REQUEST_UNAUTHORIZED,"没有相关的数据！");
    }
}
